home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cyberstrip Blackjack
/
Cyberstrip Blackjack.iso
/
pc
/
blk38pc.dir
/
00001_Script_1
next >
Wrap
Text File
|
1995-08-14
|
13KB
|
527 lines
on startmovie
puppetsprite 15, true
set the locH of sprite 15 to 90
set the locV of sprite 15 to 45
set the castnum of sprite 15 to 248
puppetsprite 16, true
set the locH of sprite 16 to 40
set the locV of sprite 16 to 45
set the castnum of sprite 16 to 248
puppetsprite 17, true
set the locH of sprite 17 to 140
set the locV of sprite 17 to 45
set the castnum of sprite 17 to 248
puppetsprite 18, true
set the locH of sprite 18 to 190
set the locV of sprite 18 to 45
set the castnum of sprite 18 to 248
puppetsprite 19, true
set the locH of sprite 19 to 240
set the locV of sprite 19 to 45
set the castnum of sprite 19 to 248
puppetsprite 20, true
set the locH of sprite 20 to 381
set the locV of sprite 20 to 382
set the castnum of sprite 20 to 248
puppetsprite 21, true
set the locH of sprite 21 to 431
set the locV of sprite 21 to 382
set the castnum of sprite 21 to 248
puppetsprite 22, true
set the locH of sprite 22 to 481
set the locV of sprite 22 to 382
set the castnum of sprite 22 to 248
puppetsprite 23, true
set the locH of sprite 23 to 531
set the locV of sprite 23 to 382
set the castnum of sprite 23 to 248
puppetsprite 24, true
set the locH of sprite 24 to 581
set the locV of sprite 24 to 382
set the castnum of sprite 24 to 248
global ybank,dbank,pot,hardamount
set hardamount = 300
set pot=10
set ybank=HardAmount
set dbank=HardAmount
end startmovie
on M13inch
global size
set size=true
set the text of cast B24 to "PLACE BET AT LEFT AND HIT OK"
set the text of cast B28 to "INSURE YOURSELF OR HIT OK"
set the text of cast B25 to "SELECT AN OPTION AT LEFT"
set the locV of sprite 20 to 382
set the locV of sprite 21 to 382
set the locV of sprite 22 to 382
set the locV of sprite 23 to 382
set the locV of sprite 24 to 382
end M13inch
ON UNPUPBUTS
REPEAT WITH I= 15 TO 24
SET THE VISIBILITY OF SPRITE I TO FALSE
END REPEAT
END UNPUPBUTS
ON PUPBUTS
REPEAT WITH I= 15 TO 24
SET THE VISIBILITY OF SPRITE I TO TRUE
END REPEAT
END PUPBUTS
on M12inch
NOTHING
end M12inch
on newgame2 amt
global HardAmount
set hardamount=amt
go "Restarter"
end newgame2
on init
M13inch
ablemenu ("options",false)
ablemenu ("bet", false)
ablemenu ("Insure",false)
global NumCards, CardNum, Card, ybank,dbank,pot, insured, size , hardamount
set pot=10
set ybank=HardAmount
set dbank=HardAmount
set insured=0
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
put 156 into numcards
put 0 into cardnum
put Array(mnew) into Card
repeat while cardnum<numcards
card(mPut, cardnum, (cardnum mod 52))
set cardnum=cardnum+1
end repeat
global tencards, cardVal
put 0 into tencards
put array2(mnew) into cardVal
repeat while tencards<10
cardval(mput, tencards, 0)
set tencards=tencards+1
end repeat
end init
on shuffle
global Numcards, Cardnum, Card
set cardnum=0
set temp1 = 0
set temp2 = 0
repeat while (cardnum<(numcards*4))
set tempnum1 = ((random(numcards))-1)
set tempnum2 = ((random(numcards))-1)
set temp1=card(mget,tempnum1)
set temp2=card(mget,tempnum2)
card(mput,tempnum1,temp2)
card(mput,tempnum2,temp1)
set cardnum=cardnum+1
end repeat
set cardnum=0
end shuffle
factory Array
--
end Array
factory Array2
--
end Array2
on getcard slot, val
global card, cardnum, numcards, cardval, dfirstcard
set the castnum of sprite slot to (193+card(mget, cardnum))
if slot =15 then
set dfirstcard = (193+card(mget,cardnum))
set the castnum of sprite 15 to 245
end if
set temp=0
set temp= (card(mget,cardnum) mod 13)
set temp=temp+2
if (temp=11 or temp=12 or temp=13) then set temp=10
if temp=14 then set temp=11
cardval(mput, val, temp)
set cardnum=cardnum +1
if cardnum = numcards then play "shuffle"
end getcard
on newgame
global tencards, cardVal,dfirstcard, insured
set insured=0
set dfirstcard=245
put 0 into tencards
repeat while tencards<10
cardval(mput, tencards, 0)
set tencards=tencards+1
end repeat
set the castnum of sprite 15 to 248
set the castnum of sprite 16 to 248
set the castnum of sprite 17 to 248
set the castnum of sprite 18 to 248
set the castnum of sprite 19 to 248
set the castnum of sprite 20 to 248
set the castnum of sprite 21 to 248
set the castnum of sprite 22 to 248
set the castnum of sprite 23 to 248
set the castnum of sprite 24 to 248
end newgame
on betdeductions
global ybank,dbank,pot,size
set ybank=ybank-pot
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
end betdeductions
on hit1
global ytotal
getcard (22,2)
ycountcards
if ytotal =21 then
go "end"
exit
end if
if ytotal=0 then
go "Dwin"
exit
end if
go "round2"
end hit1
on hit2
global ytotal
getcard (23,3)
ycountcards
if ytotal =21 then
go "end"
exit
end if
if ytotal=0 then
go "Dwin"
exit
end if
go "round3"
end hit2
on hit3
global ytotal
getcard (24,4)
ycountcards
if ytotal =21 then
go "end"
exit
end if
if ytotal=0 then
go "Dwin"
exit
end if
go "Lhit"
end hit3
on DD
global ytotal
getcard (24,4)
ycountcards
if ytotal =21 then
go "end"
exit
end if
if ytotal=0 then
go "Dwin"
exit
end if
end DD
on ycountcards
global cardval,ytotal, ybank,dbank,pot,size,extra
set ytotal=0
set temp1=cardval(mget,0)
set temp2=cardval(mget,1)
set temp3=cardval(mget,2)
set temp4=cardval(mget,3)
set temp5=cardval(mget,4)
set extra = 0
--equal 21
if temp1+temp2=21 then
set ytotal=21
set the text of cast "yresult" to "You Drew A Natural Blackjack!!!"
set the text of cast "dresult" to "I Pay You 1.5 to 1"
set extra=(pot/2)
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
go "Ywin"
exit
end if
if temp1+temp2+temp3+temp4+temp5=21 then
set ytotal=21
set the text of cast "yresult" to "You Got 21"
go "end"
exit
end if
--over 21
if temp1+temp2+temp3+temp4+temp5>21 then
--if Ace
if temp1=11 then
cardval(mput,0,1)
ycountcards
exit
end if
if temp2=11 then
cardval(mput,1,1)
ycountcards
exit
end if
if temp3=11 then
cardval(mput,2,1)
ycountcards
exit
end if
if temp4=11 then
cardval(mput,3,1)
ycountcards
exit
end if
if temp5=11 then
cardval(mput,4,1)
ycountcards
exit
end if
--bust
set ytotal=0
set the text of cast "Yresult" to "You Busted"
set the text of cast "Dresult" to "I Win By Default"
exit
end if
--under 21
set ytotal =Temp1+temp2+temp3+temp4+temp5
set the text of cast "yresult" to "You have "&ytotal
end ycountcards
on dcountcards
global cardval,dtotal,ytotal
set dtotal=0
set temp1=cardval(mget,5)
set temp2=cardval(mget,6)
set temp3=cardval(mget,7)
set temp4=cardval(mget,8)
set temp5=cardval(mget,9)
--equal 21
if temp1+temp2=21 then
set dtotal=21
set the text of cast "Dresult" to "I Drew Natural Blackjack"
go "after"
exit
end if
if temp1+temp2+temp3+temp4+temp5=21 then
set dtotal=21
set the text of cast "Dresult" to "I Got 21"
go "after"
exit
end if
--over 21
if temp1+temp2+temp3+temp4+temp5>21 then
--if Ace
if temp1=11 then
cardval(mput,5,1)
ycountcards
exit
end if
if temp2=11 then
cardval(mput,6,1)
ycountcards
exit
end if
if temp3=11 then
cardval(mput,7,1)
ycountcards
exit
end if
if temp4=11 then
cardval(mput,8,1)
ycountcards
exit
end if
if temp5=11 then
cardval(mput,9,1)
ycountcards
exit
end if
--bust
set dtotal=0
set the text of cast "Dresult" to "I Busted"
set the text of cast "Yresult" to "You Winà"
go "Ywin"
exit
end if
--under 21
set dtotal =temp1+temp2+temp3+temp4+temp5
set the text of cast "Dresult" to "I have "&Dtotal
if dtotal>16 then
go "After"
exit
end if
end dcountcards
on Ymoney
global ybank,dbank,pot,size,extra
set dbank=dbank-pot
set ybank=ybank+(2*pot)
set ybank=ybank+extra
set dbank=dbank-extra
set pot=10
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
end Ymoney
on YTie
global ybank,dbank,pot,size
set ybank=ybank+pot
set pot=10
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
end YTie
on dmoney
global ybank,dbank,pot,insured,size
set dbank=dbank+pot
set pot=10
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
end dmoney
on checkwinner
global ytotal,dtotal
if ytotal>dtotal then
go "ywin"
exit
end if
if dtotal>ytotal then
go "dwin"
exit
end if
go "tie"
exit
end checkwinner
on doubledown
global ybank,dbank,pot,size
set ybank=ybank-pot
set pot=pot+pot
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
end doubledown
on InsureMe
ablemenu ("insure",false)
global insured, ybank,dbank,pot,size
set ybank=ybank-(pot/2)
set dbank=dbank+(pot/2)
set insured = 1
set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
return&return&"BANK:"&return&"$"&ybank
go "round1"
end InsureMe
on insureMeNot
ablemenu ("insure",false)
go "round1"
end insureMeNot
on FaerieOn
puppetsprite 4, true
global cardval,cardnum,card
set temp=0
set temp= (card(mget,cardnum) mod 13)
set temp=temp+2
if (temp=11 or temp=12 or temp=13) then set temp=10
if temp=14 then set temp=1
If cardval(mget,0)+cardval(mget,1)+cardval(mget,2)+cardval(mget,3)+cardval(mget,4)+temp>21 then
set the castNum of sprite 4 to the number of cast "Stay"
exit
end if
set the castNum of sprite 4 to the number of cast "Hit"
end FaerieOn
on bossStart
when timeout then Nothing
sound stop 1
sound stop 2
end bossStart
on bossOver
nothing
end bossOver
on stopmovie
puppetsprite 7, false
puppetsprite 15, false
puppetsprite 16, false
puppetsprite 17, false
puppetsprite 18, false
puppetsprite 19, false
puppetsprite 20, false
puppetsprite 21, false
puppetsprite 22, false
puppetsprite 23, false
puppetsprite 24, false
end stopmovie
on bet amount
global pot,ybank
set pot=amount
set the text of cast "Info" = "BET:"&return&"$"&POT&return&return&"BANK:"&return&"$"&ybank
go "Postbet"
end bet
on Hitter
ablemenu ("options",false)
if the frame < 37 then
hit1
exit
end if
if the frame > 41 then
hit3
exit
end if
if the frame >37 and the frame <41 then
hit2
exit
end if
end hitter
on ablemenu themenu, flag
NOTHING
end ablemenu